
var schoolChart = echarts.init(document.getElementById('student'));
$.get('admin/Dashboard/student').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    schoolChart.setOption({
        title: {
            text: '生源分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '学生来源',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
var teacher = echarts.init(document.getElementById('teacher'));
$.get('admin/Dashboard/teacher').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    teacher.setOption({
        title: {
            text: '教师分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '教师类别',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
var course = echarts.init(document.getElementById('course'));
$.get('admin/Dashboard/course').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    course.setOption({
        title: {
            text: '课程分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '课程分类',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
var project = echarts.init(document.getElementById('project'));
$.get('admin/Dashboard/project').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    project.setOption({
        title: {
            text: '项目分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '项目分类',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
var sucai = echarts.init(document.getElementById('sucai'));
$.get('admin/Dashboard/sucai').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    sucai.setOption({
        title: {
            text: '素材分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '素材分类',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
var youxiu = echarts.init(document.getElementById('youxiu'));
$.get('admin/Dashboard/youxiu').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    youxiu.setOption({
        title: {
            text: '优秀作品分布图',
            x: 'center'
        },
        color:['#dc69aa','#8d98b3','#ffb980','#5ab1ef','#95706D','#2ec7c9','#b6ade','#da7a80','#6950a1','#1d953f','#44693'],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        series: [
            {
                name: '优秀作品分类',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: data

            }
        ]
    });
});
